home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Library / Manuels & Misc / Assembly / AOA.ZIP / CH08 / MATRIX.A < prev    next >
Encoding:
Text File  |  1996-02-06  |  1.7 KB  |  87 lines

  1. ; MATRIX.A
  2. ;
  3. ; This include file provides the external definitions
  4. ; and data type definitions for the matrix sample program
  5. ; in Chapter Eight
  6. ;
  7. ; Some useful type definitions:
  8.  
  9. Integer        typedef    word
  10. Char        typedef    byte
  11.  
  12.  
  13. ; Some common constants:
  14.  
  15. Bell        equ    07    ;ASCII code for the bell character.
  16.  
  17.  
  18. ; A "Dope Vector" is a structure containing information about arrays that
  19. ; a program allocates dynamically during program execution.  This particular
  20. ; dope vector handles two dimensional arrays.  It uses the following fields:
  21. ;
  22. ;    TTL-    Points at a zero terminated string containing a description
  23. ;        of the data in the array.
  24. ;
  25. ;    Func-    Pointer to function to compute for this matrix.
  26. ;
  27. ;    Data-    Pointer to the base address of the array.
  28. ;
  29. ;    Dim1-   This is a word containing the number of rows in the array.
  30. ;
  31. ;    Dim2-    This is a word containing the number of elements per row
  32. ;        in the array.
  33. ;
  34. ;    ESize-    Contains the number of bytes per element in the array.
  35.  
  36. DopeVec        struct
  37. TTL        dword    ?
  38. Func        dword    ?
  39. Data        dword    ?
  40. Dim1        word    ?
  41. Dim2        word    ?
  42. ESize        word    ?
  43. DopeVec        ends
  44.  
  45.  
  46. ; Some text equates the matrix code commonly uses:
  47.  
  48. Base        textequ    <es:[di]>
  49.  
  50. byp        textequ    <byte ptr>
  51. wp        textequ    <word ptr>
  52. dp        textequ    <dword ptr>
  53.  
  54.  
  55. ; Procedure declarations.
  56.  
  57. InpSeg        segment    para public 'input'
  58.  
  59.         externdef geti:far
  60.         externdef getarray:far
  61.  
  62. InpSeg        ends
  63.  
  64.  
  65. cseg        segment    para public 'code'
  66.  
  67.         externdef CrossProduct:near
  68.  
  69. cseg        ends
  70.  
  71.  
  72. ; Variable declarations
  73.  
  74. dseg        segment    para public 'data'
  75.  
  76.         externdef InputLine:byte
  77.  
  78. dseg        ends
  79.  
  80.  
  81. ; Uncomment the following equates if you want to turn on the
  82. ; debugging statements or if you want to include the MODULO function.
  83.  
  84.  
  85. ;debug        equ    0
  86. ;DoMOD        equ    0
  87.